%
% optimizes the path for a given list of sites
%
function op = optimizePath(filename)

% get sites
sites = readTourFile(filename);

% TODO change distance metrics
% distances = getDistances(sites);
distances = getModifiedDistances(sites)

[len n] = size(sites);

[op min] = getNearestPath(sites, 1, distances);

for idx = 2:len
    [p l] = getNearestPath(sites, idx, distances);
    if l < min
        op = p;
        min = l;
    end
end